package com.huitone.gddw.service.dto;

import com.huitone.gddw.common.excel.ColToProperty;
import com.huitone.gddw.common.excel.TabCol;
import com.huitone.gddw.dao.entity.Sensitive;

/**
 * 敏感词过滤 DTO 对象
 * @author wuluodan
 *
 */
public class SensitiveDTO {

	@ColToProperty
	@TabCol(Index = 1, title = "序号", width = "")
	private Integer seq;
	
	private String senId;
	
	@ColToProperty
	@TabCol(Index = 2, title = "敏感词名称", width = "90")
	private String senName;
	
	private String status;
	
	@ColToProperty
	@TabCol(Index = 3, title = "状态", width = "")
    private String statusStr;
	
	@ColToProperty
	@TabCol(Index = 4, title = "敏感词说明", width = "150")
	private String desc;
	
	public SensitiveDTO() {}
	
	public SensitiveDTO(Sensitive entity) {
		this.setSenId(entity.getSenId());
		this.setSenName(entity.getSenName());
		this.setStatus(entity.getStatus());
		this.setDesc(entity.getDesc());
	}

	public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public String getSenId() {
		return senId;
	}

	public void setSenId(String senId) {
		this.senId = senId;
	}

	public String getSenName() {
		return senName;
	}

	public void setSenName(String senName) {
		this.senName = senName;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getStatusStr() {
		if (null == this.status) {
			return "未知";
		}
		if (this.status.equals("1")) {
			return "有效";
		}
		if (this.status.equals("0")) {
			return "失效";
		}
		return "未知";
	}

	public void setStatusStr(String statusStr) {
		this.statusStr = statusStr;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
	
}
